package com.kingyun.gpsinspection.purificationservice.facade.service.iam.qhse;

import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.BootstrapSearchBean;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.qhse.ContingencyPlan;

/**
 * 应急预案服务层
 */
public interface ContingencyPlanService{
    /**
     * 根据ids删除应急预案
     * @param contingencyPlanId
     * @return
     */
    int deleteByPrimaryKey(String[] contingencyPlanId);

    /**
     * 新增应急预案
     * @param record
     * @return
     */
    int insertSelective(ContingencyPlan record, String uploadFiles, String deletedFiles);

    /**
     * 根据id查询
     * @param contingencyPlanId
     * @return
     */
    ContingencyPlan selectByPrimaryKey(String contingencyPlanId);

    /**
     * 根据id更新应急预案
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(ContingencyPlan record, String uploadFiles, String deletedFiles);

    /**
     * 查询应急预案列表
     * @param bootstrapSearchBean
     * @return
     */
    JSONObject contingencyPlanList(BootstrapSearchBean bootstrapSearchBean);

    /**
     * 判断应急预案名是否存在
     * @param planName 应急预案名
     * @param orgId 组织id
     * @return
     */
    boolean isExitByName(String planName, String orgId);
}